<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label for="userid" class="control-label col-xs-12 col-sm-2">{:__('User id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="userid" name="row[userid]" value="{$row.userid}" data-rule="required;userid" />
        </div>
    </div>
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="username" name="row[username]" value="{$row.username}" data-rule="required;username" />
        </div>
    </div>
    <div class="form-group">
        <label for="leave_begin_time" class="control-label col-xs-12 col-sm-2">{:__('Leave_begin_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="leave_begin_time" name="row[leave_begin_time]" value="{$row.leave_begin_time}"/>
        </div>
    </div>
    <div class="form-group">
        <label for="leave_end_time" class="control-label col-xs-12 col-sm-2">{:__('Leave_end_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="leave_end_time" name="row[leave_end_time]"   value="{$row.leave_end_time}" />
        </div>
    </div>
    <div class="form-group">
        <label for="leave_type" class="control-label col-xs-12 col-sm-2">{:__('leave_type')}:</label>
        <div class="col-xs-12 col-sm-8" id="leave_type">
            事假： <input type="radio" {if condition="$row.leave_type ==1 "}checked{/if}  name="row[leave_type]" value="1" data-rule="required;leave_type" />
            病假： <input type="radio" {if condition="$row.leave_type ==2 "}checked{/if}  name="row[leave_type]" value="2" data-rule="required;leave_type" />
        </div>
    </div>
    <div class="form-group">
        <label for="leave_reason" class="control-label col-xs-12 col-sm-2">{:__('leave_reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea cols="75" rows="5" id="leave_reason"  name="row[leave_reason]"  >{$row.leave_reason}</textarea>
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>